This invention relates to the processing and printing of images represented by coded or non-coded digital information in the form of lines of raster bits arranged in a given scan format, and in particular to the rotation of such images.
The prior art is replete with techniques for image rotation. For example, IBM Technical Disclosure Bulletins Vol. 17, No. 10, March 1975, and Vol. 18, No. 8, January 1976 disclose shift registers for image orientation. Other systems such as shown in U.S. Pat. No. 4,000,486 describe a page memory access control having a plurality of registers associated with rows on a page to be printed. U.S. Pat. No. 4,271,476 shows a method for rotating images having a horizontal scan format into a vertical scan format. The digital image is divided into a plurality of sections, the scan direction of each section is rotated in sequence, and then the rotated sections are combined. See also U.S. Pat. Nos. 3,976,982 and 4,300,206.
Another method of rotation is shown in an article in IEEE Transactions on Computers, July 1972, titled "A Fast Computer Method for Matrix Transposing". In particular, the article teaches a mathematical theory for rotation of matrices. In other methods, for example, U.S. Ser. No. 547,199, filed Oct. 31, 1983, there is shown a method of rotating digital images by dividing the image into horizontal regions of equal size that can be manipulated in computer memory. Each region is rotated separately and a scratch file is produced containing the rotated regions in sequence. In a series of steps, the rotated regions are progressively doubled in size until one region includes the entire rotated image.
Raster printing systems usually store character representations as a matrix of bits. The matrix, or bitmap, is merged into the data stream being transmitted to the output device. If the printer is required to print in both landscape and portrait mode, then separate bitmaps are used for each rotation of the image or font, as disclosed in U.S. Pat. Nos. 4,000,486 and 3,898,627.
Rather than implement a buffer large enough to store the entire raster image, a frequently-used buffering technique in raster printing systems is generation of the image incrementally in small groups of scan lines called bands, as disclosed in U.S. Pat. No. 4,203,154. The bands are assumed to have fixed length and width so that each band of image data occurs at a fixed place within the image. A double buffering approach allows a band to be generated and stored in a small band buffer while the previous band is transmitted to the printer.
There are five major components to a system using this band buffer approach for character printing: the Band Buffers, an Image/Font Memory holding scanned images and character bitmaps for each font, a Video Controller which retrieves data from the Image/Font memory and loads the band buffers with video data, a Print Controller which interprets character requests and generates commands for the Video Controller and an Output Controller which extracts video data from the band buffers after they are filled by the Video Controller and presents the video data to the image output terminal in scan line form.
Portrait printing is defined to be raster scanning of a page if the raster scans go down with the lines of the page. For example, a typewriter is a portrait raster scan device. The carriage scans horizontally and the text is read horizontally. On the other hand, a landscape printing the page is scanned horizontally but the text is read by turning the page 90 degrees. Two additional orientations are sometimes also used: inverse portrait in which the original portrait image is rotated 180 degrees and inverse landscape in which the original landscape image is rotated 180 degrees.
A difficulty in the prior art is to be able to generate any of these four orientations during print time. In other words, in the prior art if the image is stored in a portrait mode, the image must be rotated and restored before printing in the landscape mode. This requires more space and more time. It would be desirable therefore to be able to print in a given mode without the necessity of re-orienting the image in memory.
It is an object of the present invention, therefore, to provide an improved image rotation system. It is another object of the present invention to provide a system that is capable of rotating images during real time generation of the video data for printing without first re-orienting and storing the rotated image prior to printing. It is still another object of the present invention to augment the word-addressable band buffers to enable character bitmaps in a single rotation to be used to perform image generation for portrait, landscape, inverse portrait and inverse landscape modes.
Further advantages of the present invention will become apparent as the following description proceeds, and the features characterizing the invention will be pointed out in the claims annexed to and forming a part of this specification.
Briefly, the present invention is concerned with bitmap data and methods of conveying bit map data into and out of a band buffer and shift register or multiplexor to an image output terminal to provide either portrait or landscape printing during print time. That is, the five components used in band buffer printing are extended to meet image rotation objectives. First, a word-addressable Image/Font CrossStrike Memory format is used to store scanned images and character bitmaps. Second, word-addressable Band Buffers are used to provide video buffering which using a format which corresponds to the CrossStrike format. Then the Band Buffers are extended to also hold video data in a Folded Configuration. The Video Controller is enhanced to transfer and scatter whites so that the Video Controller is capable of producing video data in the Band Buffers in both the Standard CrossStrike Configuration and the Folded Configuration. Finally, the Output Controller is enhanced to complete the remaining video data re-orienting required to perform rotation.